(function(){
	var docID = getID("docID");
	//拼接url
	var url = "/fundsmanager/getfinancialregistration/"+docID;
	//对返回结果做异常处理
	getData(url,function(res){
		if(res.code == 0) {
			getBusinessData(res.data.financialRegisterItem);
		}else {
			alert(res.msg);
		}
	})

	//拼接字符串函数
	function getBusinessData(data) {
		//表格字符串
		var	str ="<table class='table' cellspacing='0' cellpadding='0' border='1px'>"
				+ "<th class='bg_blue title' id='BUKRS'>公司代码</th>"
				+ "<th class='bg_blue title' id='ZDJDJBH'>登记单据编号</th>"
				+ "<th class='bg_blue title' id='ZDJDJRQ'>登记单据日期</th>"
				+ "<th class='bg_blue title' id='PRCTR'>利润中心</th>"
				+ "<th class='bg_blue title' id='ZSHQC'>是否期初</th>"
				+ "<th class='bg_blue title' id='ZJYLXBM'>交易类型编码</th>"
				+ "<th class='bg_blue title' id='ZJYLXMC'>交易类型名称</th>"
				+ "<th class='bg_blue title' id='ZDJZT'>单据状态</th>"
				+ "<th class='bg_blue title' id='ZLCCPLX'>理财产品类型</th>"
				+ "<th class='bg_blue title' id='ZTZXM'>投资项目</th>"
				+ "<th class='bg_blue title' id='ZJJGS'>基金公司</th>"
				+ "<th class='bg_blue title' id='ZJNJW'>境内/境外</th>"
				+ "<th class='bg_blue title' id='ZFXJG'>发行机构</th>"
				+ "<th class='bg_blue title' id='BANKN'>付款银行账号</th>"
				+ "<th class='bg_blue title' id='NAME1_TEXT'>付款银行户名</th>"
				+ "<th class='bg_blue title' id='BANKA'>付款银行全称</th>"
				+ "<th class='bg_blue title' id='ZJTQY'>集团/区域</th>"
				+ "<th class='bg_blue title' id='ZSSBK'>所属板块</th>"
				+ "<th class='bg_blue title' id='ZSHDSF'>资金是否需要转第三方账户</th>"
				+ "<th class='bg_blue title' id='ZZFFS'>支付方式</th>"
				+ "<th class='bg_blue title' id='ZBANKN2'>收款银行账户</th>"
				+ "<th class='bg_blue title' id='ZNAME1_TEXT2'>收款银行户名</th>"
				+ "<th class='bg_blue title' id='ZBANKA2'>收款银行全称</th>"
				+ "<th class='bg_blue title' id='ZGMYY'>购买原因</th>"
				+ "<th class='bg_blue title' id='ZLCFJ'>理财附件</th>"
				+ "<th class='bg_blue title' id='ZCPDM'>产品代码</th>"
				+ "<th class='bg_blue title' id='ZCPMC'>产品名称</th>"
				+ "<th class='bg_blue title' id='ZSHBB'>是否保本</th>"
				+ "<th class='bg_blue title' id='ZSHYCLH'>是否有承诺函</th>"
				+ "<th class='bg_blue title' id='ZJE'>金额</th>"
				+ "<th class='bg_blue title' id='WAERS'>币种</th>"
				+ "<th class='bg_blue title' id='KURSF'>汇率</th>"
				+ "<th class='bg_blue title' id='ZBWBJE'>本位币金额</th>"
				+ "<th class='bg_blue title' id='ZJXJC'>计息基础（360/365)</th>"
				+ "<th class='bg_blue title' id='ZQXR'>起息日</th>"
				+ "<th class='bg_blue title' id='ZYQDQR'>预期到期日</th>"
				+ "<th class='bg_blue title' id='ZYQQX'>预期期限(天)</th>"
				+ "<th class='bg_blue title' id='ZYQNHL'>预期年化收益率(%)</th>"
				+ "<th class='bg_blue title' id='ZYQSY'>预期收益</th>"
				+ "<th class='bg_blue title' id='ZYQSY2'>预期收益(手工)</th>"
				+ "<th class='bg_blue title' id='ZSHJE'>赎回金额</th>"
				+ "<th class='bg_blue title' id='ZBJSZXM'>本金收支项目</th>"
				+ "<th class='bg_blue title' id='ZBJJHXM'>本金计划项目</th>"
				+ "<th class='bg_blue title' id='ZBJXJLL'>本金现金流量项目</th>"
				+ "<th class='bg_blue title' id='ZYQRSY'>预期日收益</th>"
				+ "<th class='bg_blue title' id='ZYY'>原因</th>"
				+ "<th class='bg_blue title' id='ZKXXFX'>可行性分析</th>"
				+ "<th class='bg_blue title' id='ZBZ'>备注</th>"
				+ "<th class='bg_blue title' id='BELNR'>会计凭证号</th>"
				+ "<th class='bg_blue title' id='GJAHR'>会计年度</th>"
				+ "<th class='bg_blue title' id='ZJSDDH'>结算单单据号</th>"
				+ "<th class='bg_blue title' id='ZCDYY'>撤单原因</th>"
				+ "<th class='bg_blue title' id='ZZDR'>制单人</th>"
				+ "<th class='bg_blue title' id='ZZDSJ'>制单时间</th>"
				+ "<th class='bg_blue title' id='ZSPR'>审批人</th>"
				+ "<th class='bg_blue title' id='ZSPSJ'>审批时间</th>"
				+ "<th class='bg_blue title' id='ZXGR'>修改人</th>"
				+ "<th class='bg_blue title' id='ZXGSJ'>修改时间</th>"
		//数据组数
		var len = data.length;
		for (var i = 0; i < len; i++) {
			str = str + "<tr>"
				+ "<td class='content'>"+(data[i].bukrs !=  null || '' ? data[i].bukrs : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zdjdjbh !=  null || '' ? data[i].zdjdjbh : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zdjdjrq !=  null || '' ? data[i].zdjdjrq : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].prctr !=  null || '' ? data[i].prctr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zshqc !=  null || '' ? data[i].zshqc : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zjylxbm !=  null || '' ? data[i].zjylxbm : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zjylxmc !=  null || '' ? data[i].zjylxmc : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zdjzt !=  null || '' ? data[i].zdjzt : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zlccplx !=  null || '' ? data[i].zlccplx : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].ztzxm !=  null || '' ? data[i].ztzxm : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zjjgs !=  null || '' ? data[i].zjjgs : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zjnjw !=  null || '' ? data[i].zjnjw : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zfxjg !=  null || '' ? data[i].zfxjg : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].bankn != null || '' ? data[i].bankn : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].name1_text != null || '' ? data[i].name1_text : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].banka !=  null || '' ? data[i].banka : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zjtqy !=  null || '' ? data[i].zjtqy : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zssbk !=  null || '' ? data[i].zssbk : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zshdsf !=  null || '' ? data[i].zshdsf : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zzffs !=  null || '' ? data[i].zzffs : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zbankn2 != null || '' ? data[i].zbankn2 : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zname1_text2 != null || '' ? data[i].zname1_text2 : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zbanka2 != null || '' ? data[i].zbanka2 : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zgmyy != null || '' ? data[i].zgmyy : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zlcfj != null || '' ? data[i].zlcfj : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zcpdm != null || '' ? data[i].zcpdm : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zcpmc != null || '' ? data[i].zcpmc : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zshbb != null || '' ? data[i].zshbb : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zshyclh != null || '' ? data[i].zshyclh : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zje != null || '' ? data[i].zje : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].waers != null || '' ? data[i].waers : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].kursf != null || '' ? data[i].kursf : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zbwbje != null || '' ? data[i].zbwbje : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zjxjc != null || '' ? data[i].zjxjc : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zqxr != null || '' ? data[i].zqxr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zyqdqr != null || '' ? data[i].zyqdqr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zyqqx != null || '' ? data[i].zyqqx : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zyqnhl != null || '' ? data[i].zyqnhl : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zyqsy != null || '' ? data[i].zyqsy : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zyqsy2 != null || '' ? data[i].zyqsy2 : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zshje != null || '' ? data[i].zshje : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zbjszxm != null || '' ? data[i].zbjszxm : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zbjjhxm != null || '' ? data[i].zbjjhxm : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zbjxjll != null || '' ? data[i].zbjxjll : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zyqrsy != null || '' ? data[i].zyqrsy : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zyy != null || '' ? data[i].zyy : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zkxxfx != null || '' ? data[i].zkxxfx : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zbz != null || '' ? data[i].zbz : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].belnr != null || '' ? data[i].belnr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].gjahr != null || '' ? data[i].gjahr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zjsddh != null || '' ? data[i].zjsddh : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zcdyy != null || '' ? data[i].zcdyy : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zzdr != null || '' ? data[i].zzdr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zzdsj != null || '' ? data[i].zzdsj : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zspr != null || '' ? data[i].zspr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zspsj != null || '' ? data[i].zspsj : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zxgr != null || '' ? data[i].zxgr : '空值')+"</td>"
				+ "<td class='content'>"+(data[i].zxgsj != null || '' ? data[i].zxgsj : '空值')+"</td>"
				+ "</tr>";
		}
		str += "</table>";
		//渲染表格字符串
		$('.page').append(str);		
	}
		
})();